<div class="col-md-12">

	<div class="panel panel-default mt20">
		<div class="panel-body">
			<div class="form-group">
				<div class="col-sm-12">
					<div class="row">
						<div class="col-sm-2">
							<input type="text" class="form-control" ng-model="searchform.name" ng-keyup="myKeyup($event)" placeholder="产品名称">
						</div>
						<div class="col-sm-2 pull-right">
							<button class="btn btn-info btn-block" ng-click="load()">立即搜索</button>
						</div>
						<div class="col-sm-2 pull-right">
							<button class="btn btn-info btn-block" ng-click="add()">添加产品</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- searchArea -->


	<div class="panel panel-default">
		<div class="panel-body">
			<table class="table table-condensed table-hover table-bordered" style="display: table; width: 100%;table-layout:fixed;">
				<thead>
					<tr>
						<th class="text-center col-md-2">序号</th>
						<th class="text-center col-md-2">产品编号</th>
						<th class="text-center col-md-2">产品名称</th>
            <th class="text-center col-md-2">产品分类</th>
						<th class="text-center col-md-2">同步状态</th>
            <th class="text-center col-md-2">操作</th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="obj in objs">
						<td class="text-center">{{$index + 1}}</td>
						<td class="text-center">{{obj.sale_code}}</td>
						<td class="text-center">{{obj.name}}</td>
            <td class="text-center">{{obj.sale_category_name}}</td>
            <td class="text-center">
              <p ng-if="obj.sync_status == '1'">已同步</p>
              <p ng-if="obj.sync_status == '0'">未同步</p>
            </td>
						<td class="text-center">
              <button type="submit" class="btn btn-success" ng-click="synchro(obj.id)">同步</button>
							<button type="submit" class="btn btn-danger" ng-click="delete(obj.id)">删除</button>
						</td>
					</tr>
				</tbody>
			</table>


			<div class="text-right">

				<pagination total-items="bigTotalItems" ng-model="bigCurrentPage" ng-change="load()" previous-text="上一页" next-text="下一页"
				 first-text="首页" last-text="尾页" max-size="5" boundary-links="true" rotate="false" items-per-page="itemsPerPage"
				 class="m-t-none m-b">
				</pagination>
			</div>
		</div>
	</div>
</div>